/********************************************************************************
 *      Copyright:  (C) 2025 LingYun IoT System Studio
 *                  All rights reserved.
 *
 *       Filename:  client.h
 *    Description:  This file 
 *
 *        Version:  1.0.0(30/04/25)
 *         Author:  chenhongyu0822@163.com
 *      ChangeLog:  1, Release initial version on "30/04/25 22:08:26"
 *                 
 ********************************************************************************/
#ifndef   _CLIENT_H
#define   _CLIENT_H

#define HOSTNAME_LEN          64
typedef struct socket_ctx_s
{
	char             ip[HOSTNAME_LEN];
	int              port;
	int              fd;
	int              connectd;
}socket_ctx_t;

extern socket_ctx_t sock;

extern void print_usage(char *program);
 
extern int client_init(socket_ctx_t *sock, char * ip, int port);

extern int client_connect(socket_ctx_t *sock);

extern int socket_check(socket_ctx_t *sock);

extern int client_send(socket_ctx_t *sock, char *data, int size);

#endif

